package com.wen.mall.pojo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * (MallUser)实体类
 *
 * @author makejava
 * @since 2021-08-12 11:09:00
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("User实体类")
public class User implements Serializable {
    private static final long serialVersionUID = -75555396522283067L;

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }

    /**
     * 用户表id
     */
    @ApiModelProperty("id")
    private Integer id;

    public User(String username, String password, String email, Integer role, Date createTime, Date updateTime) {
        this.username = username;
        this.password = password;
        this.email = email;
        this.role = role;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    /**
     * 用户名
     */
    @ApiModelProperty("用户名")
    private String username;

    /**
     * 用户密码，MD5加密
     */
    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("手机号")
    private String phone;

    /**
     * 找回密码问题
     */
    @ApiModelProperty("找回密码问题")
    private String question;

    /**
     * 找回密码答案
     */
    @ApiModelProperty("找回密码答案")
    private String answer;

    /**
     * 角色0-管理员,1-普通用户
     */
    @ApiModelProperty("角色0-管理员,1-普通用户")
    private Integer role;

    /**
     * 创建时间
     */

    @ApiModelProperty("创建时间")
    private Date createTime;

    /**
     * 最后一次更新时间
     */
    @ApiModelProperty("最后一次更新时间")
    private Date updateTime;


}
